home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / msdos / css / demo2.c < prev    next >
C/C++ Source or Header  |  1991-10-18  |  777b  |  27 lines

  1. #include "csscom.h"
  2. double PI2,Q1,Q2,Q3,Y1,Y2,Y3,Y4;
  3. _titleS[0]=0;gopen(0);GDS_setcompat(1);tpalet();
  4. sprintf(_titleS, "SWEEP");
  5. LTIME=1;DT=0.001;_xamt=1./LTIME;
  6. sprintf(_grapS[0],"TIME");
  7. sprintf(_grapS[1],"Y1/10+0.8");
  8. sprintf(_grapS[2],"Y2/10+0.6");
  9. sprintf(_grapS[3],"Y3/10+0.4");
  10. sprintf(_grapS[4],"Y4/10+0.2");
  11. PI2=2*3.14159;Q1=40*PI2;Q3=0.05*Q1;
  12. _gtyp=11;_inigrap(_gtyp,_titleS,LTIME,_grapS,5);
  13. for(TIME=0;TIME<=LTIME;TIME+=DT){
  14. _zn=0;
  15. Q3=0.05+TIME/1.0;
  16. Y1=CMPXPL(0,Q1,0,Q1,0);
  17. Y2=SIN(0,Q1,0);
  18. Y3=SWPSIN(Q3,Q1);
  19. Y4=SWPCOS(Q3,Q1);
  20. _gpset(_gtyp, TIME, 0);
  21. _gpset(_gtyp, Y1/10+0.8, 1);
  22. _gpset(_gtyp, Y2/10+0.6, 2);
  23. _gpset(_gtyp, Y3/10+0.4, 3);
  24. _gpset(_gtyp, Y4/10+0.2, 4);
  25. }
  26. locate(78,22,CON);while(ESC!=getch());rpalet();gclose();putchar('\n');}
  27.